Linux开启ssh |
您所在的位置:网站首页 › linux ssh开启 › Linux开启ssh |
Linux开启ssh 1.Ubuntu开启ssh服务及允许root登录 安装ssh服务器端 Ubuntu默认没有安装ssh的server,需要安装apt-get install openssh-server 1 ssh客户端是默认安装的,安装包:openssh-client,apt安装 允许远程使用root账号ssh登入 修改/etc/ssh/sshd_config文件,修改如下:#PermitRootLogin prohibit-password PermitRootLogin yes 1 2 需要重启系统或者sshd服务1.sudo /etc/init.d/ssh stop 2.sudo /etc/init.d/ssh start 3.sudo service ssh start 1 2 3 安装ssh服务后,系统默认开启系统sshd,查看sshd状态如果不是默认启动,修改服务为enablesudo systemctl enable ssh 12.CentOS开启SSH服务 1.安装openssh-server yum list installed |grep openssh-server 1如果有输出,证明已经安装了openssh-server,如果没有,需要安装 yum install openssh-server 12.修改sshd服务配置文件 编辑sshd服务配置文件vi /etc/ssh/sshd_config 1 开启监听端口Port 22 ListenAddress 0.0.0.0 ListenAddress :: 1 2 3 允许远程登录PermitRootLogin yes 1 使用用户名密码作为验证连接PasswordAuthentication yes 1 开启sshd服务service sshd start 1 配置开机自启动systemctl enable sshd ———————————————— 版权声明:本文为CSDN博主「Tame_complexity」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/crayon0/article/details/122272001 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |